<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>CSS 动画调试演示</title>
    <style>
        .box {
            width: 100px;
            height: 100px;
            background-color: #3498db;
            position: relative;
            animation: moveAndRotate 3s infinite;
            animation-play-state: running;
        }

        .box:hover {
            animation-play-state: paused;
        }

        @keyframes moveAndRotate {
            0% {
                transform: translateX(0) rotate(0deg);
                background-color: #3498db;
            }
            50% {
                transform: translateX(200px) rotate(180deg);
                background-color: #e74c3c;
            }
            100% {
                transform: translateX(0) rotate(360deg);
                background-color: #3498db;
            }
        }

        .controls {
            margin-top: 20px;
        }

        button {
            padding: 8px 16px;
            margin: 0 5px;
        }
    </style>
</head>
<body>
    <h1>CSS 动画调试演示</h1>
    <p>提示：</p>
    <ul>
        <li>打开 Chrome DevTools (F12)</li>
        <li>切换到 Elements 面板</li>
        <li>在右侧样式面板找到 Animations 标签</li>
        <li>悬停在元素上可以暂停动画</li>
    </ul>

    <div class="box"></div>

    <div class="controls">
        <button onclick="playAnimation()">播放</button>
        <button onclick="pauseAnimation()">暂停</button>
    </div>

    <script>
        function playAnimation() {
            document.querySelector('.box').style.animationPlayState = 'running';
        }
        
        function pauseAnimation() {
            document.querySelector('.box').style.animationPlayState = 'paused';
        }
    </script>
</body>
</html> 